package com.ahdms.es;

import com.ahdms.es.config.PropertiesConfig;
import com.ahdms.es.util.NioUtils;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;

/**
 * @author qinxiang
 * @date 2021-04-09 14:11
 */
public class EsApiStart {

    public static synchronized void initConfig(String configUrl) throws IOException {
        Properties properties = NioUtils.loadProperties(configUrl);
        PropertiesConfig.loadConfig(properties);
    }

    public static synchronized void initConfig(Properties properties) throws IOException {
        PropertiesConfig.loadConfig(properties);
    }

}
